package com.sh1604.duitang.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;

import com.sh1604.duitang.R;

import java.util.ArrayList;

public class HomeItemClickActivity extends AppCompatActivity {

    private String url;
    private ArrayList<String> urlList;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_item_click);
        getExtra();
        WebView wv = (WebView) findViewById(R.id.wv);
        wv.loadUrl(url);
    }

    private void getExtra() {
        Intent intent = getIntent();
        urlList = intent.getStringArrayListExtra("url");
        int position = intent.getIntExtra("position", 0);
        url = urlList.get(position);
    }


}
